home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / c / cug236.zip / CFLOW.DOC < prev    next >
Text File  |  1980-01-02  |  2KB  |  68 lines

  1. /*
  2.     HEADER:        CUG000.00;
  3.     TITLE:        Documentation for Function Abstractor;
  4.     DATE:        04/19/1987;
  5.     VERSION:    3.0;
  6.     FILENAME:    CFLOW.DOC;
  7.     SEE-ALSO:    CFLOW.C;
  8.     AUTHORS:    W. C. Colley III, Mark Ellington;
  9. */
  10.  
  11.     CFLOW --
  12.         a program to reveal C program structure 
  13.                    by Mark Ellington
  14.  
  15.     In exploring the many C programs available in the public
  16.     domain you may discover that many are poorly commented
  17.     (if at all) and use difficult to decipher program structure
  18.     It may be hard to remember how your own programs work when
  19.     they are not fresh in your mind.  If you want to change a 
  20.     module what will happen to other functions that use it, 
  21.     and which ones are they? 
  22.  
  23.     This program, CFLOW, accepts a C source file as input
  24.     and generates as output to STDOUT a roughly structured
  25.     listing of module (function) declarations and the function
  26.     calls within them.
  27.  
  28.     The listing is vertically structured according to sequence,
  29.     with each module call encountered (i.e. printf(---)) listed
  30.     on a new line.  The horizontal structuring is strictly in
  31.     accordance with the level of open braces "{" at the time
  32.     the module call is read, and is developed by sending one
  33.     horizontal tab for each open level at the time the function
  34.     call is read.  A function declaration (where the function
  35.     and its variables are declared) will always be at braces 
  36.     level 0 and will be at the left margin.  For convenience
  37.     the module declarations are preceded by "**" on the line
  38.     above and include their variable declarations.
  39.     
  40.     Nesting without braces, as within a multiple level "if"
  41.     construct, is not revealed by CFLOW.  Include files are
  42.     ignored as are "#define" macros.  
  43.  
  44.     To use cflow, simply type in:
  45.  
  46.          "CFLOW FILENAME.EXT"  
  47.  
  48.     Use the complete filename (drive and extension).  The 
  49.     structure listing will be sent to the screen.  To get a
  50.     printed listing, use the host operating system's (or
  51.     compiler's) I/O redirection facilities to redirect stdout
  52.     to your printer.  Under MSDOS, it goes like this:
  53.  
  54.         "CFLOW FILENAME.EXT >PRN"
  55.  
  56.     Under CP/M or MSDOS, you can use control-P (also control-
  57.     PrtSc under MSDOS) and send to the console as usual.  To
  58.     route the listing to a disk file type:
  59.  
  60.         "CFLOW FILENAME.EXT >LISTFILE.EXT"
  61.  
  62.                         M.S.E.
  63.                         05/27/84
  64.  
  65.                         Edited by WCC3
  66.                         04/19/87
  67. iables are declared) will always be at braces 
  68.     level 0 and will be at the left margin.  For c